home *** CD-ROM | disk | FTP | other *** search
/ Sounds Terrific 1 / Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso / modules / s / smenu412.mod < prev    next >
Encoding:
Text File  |  1994-08-04  |  5.7 KB  |  197 lines

  1. SMENU412.MOD   Hotkey pop-up sysop/cosysop menu
  2. Stingray #52 @5060
  3. Sat Nov 30 11:29:00 1991
  4. Name:        SMENU412.MOD
  5. Author:      Stingray
  6. Difficulty:  Easy
  7. Version:     WWIV 4.11, 4.12 version.  WWIV v4.20 version also available.
  8. Files:       VARS.H, FCNS.H, COM.C, SYSOPF.C
  9. Description: This mod provides a hot-keyed menu for the use of sysops and
  10.              co-sysops.  It is available from anywhere in the BBS and will
  11.              perform all of the needed functions (plus, it's easy to add
  12.              more if you want to, or to change this mod to do something
  13.              else!).  It will present the sysop or co-sysop with a prompt
  14.              when they press ^E, and they can select most cosysop or sysop
  15.              commands with single letters.
  16.  
  17.  
  18. Step 1:
  19. Backup all of your source files!
  20. I may have implanted a bug in this mod that will erase *.c, just to check
  21. if you did this.
  22. <grin>
  23.  
  24. Step 2:
  25. Load VARS.H
  26. At the end of the file, add this line:
  27. int insysmenu;
  28. Save VARS.H
  29.  
  30. Step 3:
  31. Load FCNS.H
  32. At the end of the declarations for SYSOPF.C, add this line:
  33. void sysmenu();
  34. Save FCNS.H
  35.  
  36. Step 4:
  37. Load COM.C
  38. Search for:
  39. if (helpl && !ihelp && !chatting && echo) {
  40. Two lines above that, right before it says "case 15:", put in this code:
  41.       case 5:
  42.         if ((cs())&&(okmacro)) {
  43.           sysmenu();
  44.         }
  45.         break;
  46. Save COM.C
  47.  
  48. Step 5:
  49. Load SYSOPF.C
  50. At the end of the file, block read this in:
  51. /*  Start here  */
  52.  
  53. void sysmenu()
  54. {
  55.   char chr,xl[81],cl[81],atr[81],cc,s1[81];
  56.  
  57.   if(insysmenu==0) {
  58.     savel(cl,atr,xl,&cc);
  59.     insysmenu=1;
  60.     outchr('\x0c');
  61.     while((insysmenu)&&(!hangup)) {
  62.       outstr("0/1Sysop Menu0/2-0");
  63.       if(so()) {
  64.         chr=onek("?SILTYUZVBEDGCHMOQ");
  65.       } else {
  66.         chr=onek("?SILTYUZVQ");
  67.       }
  68.       switch(chr) {
  69.         case '?':
  70.           printfile("HOTMENU");
  71.           break;
  72.         case 'S':
  73.           prstatus();
  74.           break;
  75.         case 'I':
  76.           ivotes();
  77.           sysoplog("=-Ran IVotes");
  78.           break;
  79.         case 'L':
  80.           sl1(3,s1);
  81.           printfile(s1);
  82.           break;
  83.         case 'T':
  84.           sysoplog("=-Ran TEdit");
  85.           text_edit();
  86.           break;
  87.         case 'Y':
  88.           printfile(status.log1);
  89.           break;
  90.         case 'U':
  91.           sysoplog("=-Ran UEdit");
  92.           uedit(usernum,0);
  93.           break;
  94.         case 'Z':
  95.           zlog();
  96.           break;
  97.         case 'V':
  98.           sysoplog("=-Ran VotePrint");
  99.           voteprint();
  100.           break;
  101.         case 'B':
  102.           sysoplog("=-Ran BoardEdit");
  103.           boardedit();
  104.           break;
  105.         case 'E':
  106.           prt(2,"Filename? ");
  107.           input(s1,50);
  108.           if (s1[0]) {
  109.             if ((okansi()) && (thisuser.defed))
  110.               external_edit(s1,"",thisuser.defed-1,500);
  111.             else
  112.               tedit(s1);
  113.           }
  114.           break;
  115.         case 'D':
  116.           sysoplog("=-Ran DirEdit");
  117.           dlboardedit();
  118.           break;
  119.         case 'G':
  120.           sysoplog("=-Ran GFileEdit");
  121.           gfileedit();
  122.           break;
  123.         case 'C':
  124.           sysoplog("=-Ran ChainEdit");
  125.           chainedit();
  126.           break;
  127.         case 'H':
  128.           chuser();
  129.           break;
  130.         case 'M':
  131.           if(checkpw()) {
  132.             sysoplog("=-Ran MailR");
  133.             mailr();
  134.           }
  135.           break;
  136.         case 'O':
  137.           if(checkpw()) {
  138.             sysoplog("=-Shelled to DOS");
  139.             full_external(getenv("COMSPEC"),1,0);
  140.             topscreen();
  141.           }
  142.           break;
  143.         case 'Q':
  144.           insysmenu=0;
  145.           break;
  146.       }
  147.     }
  148.     restorel(cl,atr,xl,&cc);
  149.   }
  150. }
  151.  
  152. /*  End of block read  */
  153. Save SYSOPF.C
  154.  
  155. Step 6:
  156. Load BBS.C
  157. Search for
  158.   init(1);
  159. Directly after that, add this line:
  160.   insysmenu=0;
  161. Save BBS.C
  162.  
  163. Step 7:
  164. Recompile the BBS,
  165. all done!
  166. Make sure to add a menu, HOTMENU.MSG in your GFILES directory.  Mine looks
  167. like this:
  168. 0┌───7───────────────────────────4Sysop7─4Hotkey7─4Menu7───────────────────────────0───┐
  169. │ ┌ 7Co-Sysop Commands0                                                       ┐ │
  170. 7│0  2S5>1ystem status0                    2Y5>1esterday's log0                         7│
  171. 7│0  2I5>1nitialize Voting Questions0      2U5>1ser editor0                             7│
  172. 7│0  2L5>1og0 1for today0                    2Z5>1log (system activity)0                  7│
  173. 7│0  2T5>1ext file editor0                 2V5>1oting question result > 2VOTING.TXT2     7│
  174. 7│0 ├ 7Sysop Commands0                                                         ┤  8│
  175. 7│0  2B5>1oard list editor0                2C5>1hain list editor0                       7│
  176. 7│0  2E5>1dit any text file0               2H5>1 Change to a user0                      7│
  177. 7│0  2D5>1irectory list editor0            2M5>1ail read (all mail)0                    7│
  178. 7│0  2G5>1file section edit0               2O5>1 Drop to DOS0                           7│
  179. │ └                                                                         ┘ │
  180. └───4Q2─4Quit─back─to─BBS7────────────────────────────────────4?2─4Print─this─menu0───┘
  181.  
  182.  
  183.  
  184. Disclaimer:
  185. If, suddenly, upon typing "BBS", all of your C files are erased, I'm not to
  186. blame. Really. Nope, not me.
  187. <grin>
  188. But seriously (how seriously is still under consideration), if your computer
  189. should develop a mind of its own and take over your life and blackmail you
  190. because of this mod, I didn't do it. Really.
  191.  
  192. ---->--->-->->> Stingray <<-<--<---<----
  193. Sysop of Special F/X BBS, (510) 689-8620
  194.  
  195.  
  196.  
  197.